// Clase que define una geometria simple utilizando vertices

#ifndef VERTEXGEO_H__
#define VERTEXGEO_H__

#include "BaseObject.h"
#include "Vector3.h"
#include "Color.h"

class Renderer;

class VertexGeo : public BaseObject
{
public:
	enum GeoType {
		TRIANGLES = 0,
		QUADS,
		LINES,
		POLYGON,
		TRIANGLE_STRIP
	};

	struct VertexData {
		Vector3 vertex;
		Vector3 normal;
		Color color;
	};

protected:
	VertexData *	mVertices;
	int				mVertexCount;
	GeoType			mType;

public:
	VertexGeo( GeoType type, int count, VisibleFace vf, GraphicalFace gf,ShadingModel sm);
	virtual ~VertexGeo();

	int GetVertexCount(){ return mVertexCount; }
	GeoType GetType(){ return mType; }
	
	Vector3&	GetVertex( int i ){ return mVertices[i].vertex; }
	Vector3&	GetNormal( int i ){ return mVertices[i].normal; }
	Color&		GetColor ( int i ){ return mVertices[i].color; }
	
	virtual void VRender(Renderer * render);

	void SetColor(float r, float g, float b, float a);
};

#endif // VERTEXGEO_H__